package com.lagou.niancheng.rpc.client.netty;

import com.lagou.niancheng.rpc.common.converter.Converter;
import com.lagou.niancheng.rpc.common.converter.FastJsonConverter;
import com.lagou.niancheng.rpc.common.entity.HostPortMetaData;
import lombok.Data;

import java.util.Set;

/**
 * 连接
 *
 * @author 大犬
 * @date 2020/5/1
 */
@Data
public class NettyConnectionConfig {
    /**
     * 工作线程数
     */
    private int workerThreadSize = 4;
    /**
     * 对象转换器
     */
    private Converter converter = new FastJsonConverter();
    /**
     * 负载均衡策略
     */
    private LoadBalanceStrategy loadBalanceStrategy = LoadBalanceStrategy.ROUND_ROBIN;
    /**
     * 请求等待超时
     */
    private long timeout = 30000;

    /**
     * 可用主机列表
     */
    private Set<HostPortMetaData> availableServerList;


}
